/* 
 * Copyright 2014 ShangDao.Ltd  All rights reserved.
 * SiChuan ShangDao.Ltd PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 * 
 * @ActFailDialog.java  2014年9月12日 上午9:28:51 - Guzhu
 * @author Guzhu
 * @email:muyi126@163.com
 * @version 1.0
 */

package com.android.tiango.baba.act;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;

import com.android.scsd.tiango.R;
import com.android.tiango.baba.BaBaseActivity;
import com.android.tiango.baba.util.Constants;

/**
 * 抢购还没有开始和抢购完了的Dialog
 * @author givon
 *
 */
public class ActFailDialog extends BaBaseActivity{
	private ImageView mImageView;
	private ImageView mXXImageView;
	public static final int NOT_START=0;
	public static final int QIANG_WANG=1;
	private int type;
	@Override
	protected void onCreate(Bundle arg0) {
		super.onCreate(arg0);
		setContentView(R.layout.layout_fial_dialog);
		mImageView = (ImageView) findViewById(R.id.image);
		mXXImageView = (ImageView) findViewById(R.id.iv_xx);
		mXXImageView.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				finish();
			}
		});
		Intent intent = getIntent();
		if(intent.hasExtra(Constants.DATA)){
			type = intent.getIntExtra(Constants.DATA, 0);
		}
		switch (type) {
		case NOT_START:
			mImageView.setBackgroundDrawable(getResources().getDrawable(R.drawable.not_start));
			break;
		case QIANG_WANG:
			mImageView.setBackgroundDrawable(getResources().getDrawable(R.drawable.finish));
			break;

		default:
			break;
		}
	}

}
